<%@ page import="org.activiti.engine.task.Task" %>
<%@ page import="java.util.List" %>
<%@ page import="com.zeus.activiti.web.activitiutil.ActivitiService" %>
<%@ page import="org.springframework.context.ApplicationContext" %>
<%@ page import="org.springframework.web.context.support.WebApplicationContextUtils" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2015/9/4
  Time: 13:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title></title>
</head>
<body>
    <table border="1">
      <tr>
          <td>任务ID</td>
          <td>任务名称</td>
          <td>流程定义ID</td>
          <td>流程实例ID</td>

      </tr>

      <%
          ApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(session.getServletContext());
          ActivitiService activitiService = ctx.getBean(ActivitiService.class);
          List<Task> tasks = activitiService.getPersonalTasks("dongge", null);
          for(Task task:tasks){
      %>
        <tr>
            <td><%=task.getId()%></td>
            <td><%=task.getName()%></td>
            <td><%=task.getProcessDefinitionId()%></td>
            <td><%=task.getProcessInstanceId()%></td>
        </tr>
        <%}%>
    </table>
</body>
</html>
